package com.ark.cloud.javacallnative.modules.storage.service.impl;

import com.ark.cloud.javacallnative.entity.FireDNCmd;
import com.ark.cloud.javacallnative.modules.storage.mapper.FireDNCmdMapper;
import com.ark.cloud.javacallnative.modules.storage.service.FireDNCmdService;
import com.ark.cloud.javacallnative.util.UUIDUtil;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class FireDNCmdServiceImpl extends ServiceImpl<FireDNCmdMapper, FireDNCmd> implements FireDNCmdService {

   @Resource
   private FireDNCmdMapper fireDNCmdMapper;

    @Override
    public void saveFireDNCmd(FireDNCmd fireDNCmd) {
        fireDNCmd.setId(UUIDUtil.next());

        double[] interceptRV = fireDNCmd.getInterceptRV();
        fireDNCmd.setIntercept(interceptRV.toString());

        System.out.println("fireDNCmd:"+fireDNCmd);
        fireDNCmdMapper.insert(fireDNCmd);
    }
}
